package com.briup.pts.web.controller;

import com.briup.pts.config.response.Result;
import com.briup.pts.domain.vo.HurdlesVO;
import com.briup.pts.service.HurdlesService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Tag(name = "栏圈管理模块")
@RestController
@RequestMapping("/hurdles")
@RequiredArgsConstructor
public class HurdlesController {

    private final HurdlesService hurdlesService;

    @Operation(summary = "查询所有栏圈信息下拉列表接口")
    @GetMapping("/selectAllHurdles")
    public Result<List<HurdlesVO>> selectAllHurdles(){
        List<HurdlesVO> hurdlesList = hurdlesService.queryAll();
        return Result.success(hurdlesList);
    }
}
